<!DOCTYPE html>
<html>
<head>
    @include("/template/inc/inc.html"){}
    <title>权限管理后台登入</title>
    <script>
        $(function () {
            $('#f').form('disableValidation');
            $('#n').textbox('textbox').focus();
        });
        function login() {
            $.messager.progress();
            $('#f').form('enableValidation');
            $('#f').form('submit', {
                url: '${ctxPath}/shiro/login',
                onSubmit: function () {
                    var isValid = $(this).form('validate');
                    if (!isValid) {
                        $.messager.progress('close');
                    }
                    return isValid;
                },
                success: function (data) {
                    $.messager.progress('close');
                }
            });
        }
    </script>
</head>
<body>
<div id="d" class="easyui-dialog" title="权限管理" style="width:400px;height:200px;"
     data-options="modal:true
           ,buttons:[{
				text:'登入',
				handler:function(){
				    login();
				}
			}]">
    <form id="f" method="post" data-options="ajax:false">
        <div style="margin-left: 40px;margin-top: 20px;">
            <input id="n" name="name" value="${loginName!'admin'}" class="easyui-textbox" label="登入名称" prompt="请输入登入用户名" data-options="required:true,iconCls:'icon-man'" style="width:90%">
        </div>
        <div style="margin-left: 40px;margin-top: 10px;">
            <input id="p" name="pwd" value="${loginPwd!'123456'}" class="easyui-passwordbox" label="登入密码" prompt="请输入登入密码" data-options="required:true" style="width:90%">
        </div>
    </form>
    ${errMsg!}
</div>
</body>
</html>